package org.tissou.client.DonneesAAfficher;

import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.HTML;

import java.util.Date;

import org.tissou.client.Services.MonException;
import org.tissou.client.Services.CategorieInfos;

/**
 * Created by IntelliJ IDEA.
 * User: Claire
 * Date: 03/03/2009
 * Time: 21:12:32
 * To change this template use File | Settings | File Templates.
 */
public class Element_Date implements IsSerializable, Element {

  Date date;

  public Element_Date() {
  }

  public Element_Date(Date date) {
    this.date = date;
  }

  public Date getDate() {
    return date;
  }

  public Widget ConvertirEnWidget() {
    StringBuffer b = new StringBuffer();
    return new HTML(b.append(date.getDate()).append("/")
        .append(date.getMonth() + 1).append("/")
        .append(date.getYear() + 1900).toString());
  }
  
  public Element clone() {
    return new Element_Date();
  }

  public void setCaracteristique(Date caracteristique) {

      date = caracteristique;

  }
}
